package com.wanban.downloader.service

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

class NotificationReceiver : BroadcastReceiver() {

    override fun onReceive(context: Context?, intent: Intent?) {
        if (context == null) return
        val intentToDownload = Intent()
        val packageName: String = context.packageName.toString()
        val action = String.format("%s_download_detail", packageName)
        intentToDownload.action = action
        intentToDownload.flags = Intent.FLAG_ACTIVITY_NEW_TASK
        context.startActivity(intentToDownload)
    }
}